// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import axios from 'static/utils/https.js';
Vue.prototype.$axios = axios;

Vue.prototype.$http = axios
Vue.config.productionTip = false

App.mpType = 'app'

localStorage.setItem('domain','http://localhost:8080/api')
localStorage.setItem('remote','http://123.56.164.27:8080')
//mgl add 将token和用户id先存在本地存储中
axios.post('/user/login',{
        username: 'test',
        password: 'test'
}).then((res)=>{
    console.log(res)
    let token = res.data.data.token
    let userId = res.data.data.userId
    localStorage.setItem('token',token)
    localStorage.setItem('userId',userId)
})
//mgl end

const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import App from './App.vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
